package com.yan.demo.method;

import java.util.Scanner;

public class MethodTest5 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入行数");
        int n = input.nextInt();
        System.out.println("请输入列数");
        int m = input.nextInt();
        print(n, m);
    }

    // 定义一个无返回值有参数的打印方法
    public static void print(int n, int m) {
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                System.out.print("@");
            }
            System.out.println();
        }
    }
}
